package test.com.sms.selenium.singlepoint.util;

import org.openqa.selenium.By;

import test.com.sms.selenium.framework.SeleniumPageUtil;
import test.com.sms.selenium.util.SeleniumUtil;

public class SpYAccountUserProfileMobileTabPageUtil extends SeleniumPageUtil {
	public final static By UPMT_SPAN_MAIN_HEADER = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_hdrMobile_lblHeader");
	public final static By UPMT_SPAN_APP_REGISTRATIONS = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_Header_lblHeader");
	
	public final static By UPMT_IMG_AR_REPORT_PREFERENCES = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_Header_imgPreferences");
	public final static By UPMT_IMG_AR_EXPORT = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_Header_imgExcelExport");
	
	public final static By UPMT_TD_AR_PAGE = By.xpath("//*[@id='ctl44_ParentChildContainer_PnlChildControl']/table[3]/tbody/tr/td[1]");
	public final static By UPMT_SPAN_AR_PAGE_START_NO = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_PagingTop_lblPagingPageNumber");
	public final static By UPMT_TD_AR_OF = By.xpath("//*[@id='ctl44_ParentChildContainer_PnlChildControl']/table[3]/tbody/tr/td[3]");
	public final static By UPMT_SPAN_AR_PAGE_COUNT = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_PagingTop_lblPagingPageCount");
	
	public final static By UPMT_INPUT_AR_FIRST = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_PagingTop_imgFirst");
	public final static By UPMT_INPUT_AR_PREVIOUS = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_PagingTop_imgPrevious");
	public final static By UPMT_INPUT_AR_NEXT = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_PagingTop_imgNext");
	public final static By UPMT_INPUT_AR_LAST = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_PagingTop_imgLast");
	
	public final static By UPMT_IMG_AR_FILTER_0 = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_filter_0\r\n            ");
	public final static By UPMT_IMG_AR_FILTER_1 = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_filter_1\r\n            ");
	public final static By UPMT_IMG_AR_FILTER_2 = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_filter_2\r\n            ");
	public final static By UPMT_IMG_AR_FILTER_3 = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_filter_3\r\n            ");
	public final static By UPMT_IMG_AR_FILTER_4 = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_filter_4\r\n            ");
	public final static By UPMT_IMG_AR_FILTER_5 = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_filter_5\r\n            ");
	public final static By UPMT_IMG_AR_FILTER_6 = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_filter_6\r\n            ");
	public final static By UPMT_IMG_AR_FILTER_7 = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_filter_7\r\n            ");
	
	public final static By UPMT_TH_AR_DEVICE_TYPE = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_sort_0\r\n          ");
	public final static By UPMT_TH_AR_MANUFACTURER = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_sort_1\r\n          ");
	public final static By UPMT_TH_AR_MODEL = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_sort_2\r\n          ");
	public final static By UPMT_TH_AR_OS = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_sort_3\r\n          ");
	public final static By UPMT_TH_AR_DATE_ADDED = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_sort_4\r\n          ");
	public final static By UPMT_TH_AR_LAST_AUTHENTICATED = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_sort_5\r\n          ");
	public final static By UPMT_TH_AR_MOBILE_APP = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_sort_6\r\n          ");
	public final static By UPMT_TH_AR_APP_VERSION = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_DeviceRegistrations_sort_7\r\n          ");
	
	
	public final static By UPMT_SPAN_SCANFOB_REGISTRATIONS = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_ScanfobRegistrations_Header_lblHeader");
	
	public final static By UPMT_IMG_SR_REPORT_PREFERENCES = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_ScanfobRegistrations_Header_imgPreferences");
	public final static By UPMT_IMG_SR_EXPORT = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_ScanfobRegistrations_Header_imgExcelExport");
	
	public final static By UPMT_TD_SR_PAGE = By.xpath("//*[@id='ctl44_ParentChildContainer_PnlChildControl']/table[7]/tbody/tr/td[1]");
	public final static By UPMT_SPAN_SR_PAGE_START_NO = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_ScanfobRegistrations_PagingTop_lblPagingPageNumber");
	public final static By UPMT_TD_SR_OF = By.xpath("//*[@id='ctl44_ParentChildContainer_PnlChildControl']/table[7]/tbody/tr/td[3]");
	public final static By UPMT_SPAN_SR_PAGE_COUNT = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_ScanfobRegistrations_PagingTop_lblPagingPageCount");
	
	public final static By UPMT_INPUT_SR_FIRST = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_ScanfobRegistrations_PagingTop_imgFirst");
	public final static By UPMT_INPUT_SR_PREVIOUS = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_ScanfobRegistrations_PagingTop_imgPrevious");
	public final static By UPMT_INPUT_SR_NEXT = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_ScanfobRegistrations_PagingTop_imgNext");
	public final static By UPMT_INPUT_SR_LAST = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_ScanfobRegistrations_PagingTop_imgLast");
	
	public final static By UPMT_IMG_SR_FILTER_0 = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_ScanfobRegistrations_filter_0\r\n            ");
	public final static By UPMT_IMG_SR_FILTER_1 = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_ScanfobRegistrations_filter_1\r\n            ");
	public final static By UPMT_IMG_SR_FILTER_2 = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_ScanfobRegistrations_filter_2\r\n            ");
	
	public final static By UPMT_TH_SR_MODEL = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_ScanfobRegistrations_sort_0\r\n          ");
	public final static By UPMT_TH_SR_SERIAL_NUMBER = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_ScanfobRegistrations_sort_1\r\n          ");
	public final static By UPMT_TH_SR_DATE_ASSIGNED = By.id("ctl44_ParentChildContainer_UserProfile_Mobile1_ScanfobRegistrations_sort_2\r\n          ");
	
	
	public static void enterYourAccountUserProfileMobilePage(){
		SpHomePageUtil.enter();
		SpHomePageUtil.enterYourAccountUserProfileDefaultPage();
		SeleniumUtil.click(SeleniumUtil.getCachedElement(SpYAccountUserProfileDefaultPageUtil.YAUP_TAB_MOBILE));
		waitForPageToLoad();
	}
	
	public static void waitForPageToLoad() {
		SeleniumUtil.selectDefaultContent();
		SeleniumUtil.selectFrame(SpHomePageUtil.HOME_FRAME_CONTENT_NAME);
		SeleniumUtil.waitOnElements(new By[]{
				UPMT_IMG_AR_REPORT_PREFERENCES, UPMT_IMG_AR_EXPORT, UPMT_INPUT_AR_FIRST, UPMT_INPUT_AR_PREVIOUS, UPMT_INPUT_AR_NEXT,UPMT_INPUT_AR_LAST, 
				UPMT_IMG_AR_FILTER_0, UPMT_IMG_AR_FILTER_1, UPMT_IMG_AR_FILTER_2, UPMT_IMG_AR_FILTER_3, UPMT_IMG_AR_FILTER_4, UPMT_IMG_AR_FILTER_5, 
				UPMT_IMG_AR_FILTER_6, UPMT_IMG_AR_FILTER_7, UPMT_IMG_SR_REPORT_PREFERENCES, UPMT_IMG_SR_EXPORT, UPMT_INPUT_SR_FIRST, UPMT_INPUT_SR_PREVIOUS,
				UPMT_INPUT_SR_NEXT, UPMT_INPUT_SR_LAST, UPMT_IMG_SR_FILTER_0, UPMT_IMG_SR_FILTER_1, UPMT_IMG_SR_FILTER_2
			});
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_IMG_AR_REPORT_PREFERENCES));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_IMG_AR_EXPORT));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_INPUT_AR_FIRST));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_INPUT_AR_PREVIOUS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_INPUT_AR_NEXT));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_INPUT_AR_LAST));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_IMG_AR_FILTER_0));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_IMG_AR_FILTER_1));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_IMG_AR_FILTER_2));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_IMG_AR_FILTER_3));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_IMG_AR_FILTER_4));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_IMG_AR_FILTER_5));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_IMG_AR_FILTER_6));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_IMG_AR_FILTER_7));
		
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_IMG_SR_REPORT_PREFERENCES));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_IMG_SR_EXPORT));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_INPUT_SR_FIRST));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_INPUT_SR_PREVIOUS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_INPUT_SR_NEXT));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_INPUT_SR_LAST));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_IMG_SR_FILTER_0));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_IMG_SR_FILTER_1));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(UPMT_IMG_SR_FILTER_2));
	}
	
}
